home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
nrpas13.zip
/
FPOLY.DEM
< prev
next >
Wrap
Text File
|
1991-04-29
|
563b
|
29 lines
PROGRAM d14r6(input,output);
(* driver for routine FPOLY *)
CONST
nval=15;
dx=0.1;
npoly=5;
TYPE
glnparray = ARRAY [1..npoly] OF real;
VAR
i,j : integer;
x : real;
afunc : glnparray;
(*$I MODFILE.PAS *)
(*$I FPOLY.PAS *)
BEGIN
writeln;
writeln('powers of x':38);
writeln('x':8,'x**0':11,'x**1':10,'x**2':10,'x**3':10,'x**4':10);
FOR i := 1 to nval DO BEGIN
x := i*dx;
fpoly(x,afunc,npoly);
write(x:10:4);
FOR j := 1 to npoly DO write(afunc[j]:10:4);
writeln
END
END.